package com.sywl.service.impl;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.sywl.dao.ModuleDao;
import com.sywl.orm.Module;
import com.sywl.service.ModuleService;
import com.sywl.util.DataGridModel;

@Service(value="moduleService")
@Transactional
public class ModuleServiceImpl implements ModuleService {

	@Resource(name="moduleDao")
	private ModuleDao moduleDao;
	 
	public void save(Module entity) {
		moduleDao.save(entity);
	}

	public void update(Module entity) {
		moduleDao.update(entity);
	}

	public void delete(Serializable id) {
		moduleDao.delete(id);
	}

	public Module findById(Serializable id) {
		return moduleDao.findById(id);
	}

	public List<Module> getAll() {
		return moduleDao.getAll();
	}

	public List<Module> findByHQL(String hql, Object... params) {
		return moduleDao.findByHQL(hql, params);
	}

	public Map<String, Object> getPageList(DataGridModel dgm, Module entity)
			throws Exception {
		return moduleDao.getPageList(dgm, entity);
	}
}
